import store from "@utils/store/cookie";

const state = {
  title: "",
  footer: true,
  header: true,
  navigation: true,
  backgroundColor: "#fff",
  storeItems: store.get("storeItems") || null,
  goName: store.get("goName") || ""
};

const mutations = {
  header(state, show) {
    state.header = show;
  },
  footer(state, show) {
    state.footer = show;
  },
  changeBrowserTitle(state, title) {
    state.title = title;
  },
  backgroundColor(state, color) {
    state.color = color;
    document.body.style.backgroundColor = color;
  },
  navigation(state, navigation) {
    state.navigation = navigation;
  }
};

const actions = {};

export default {
  actions,
  state,
  mutations
};
